﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Koonsoft.HYCRM.BLL;
using Koonsoft.HYCRM.Model;

public partial class Task_OverTimeTasks : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            AuditYear.Text = DateTime.Now.Year.ToString();
        }
    }


    protected void Unnamed1_Click(object sender, EventArgs e)
    {
        BindData();
    }

    private void BindData()
    {
        int empolyeeID = Convert.ToInt32(EmpolyeeList.SelectedValue);
        int branchID = Convert.ToInt32(BranchList.SelectedValue);
        int year = Convert.ToInt32(AuditYear.Text.Trim());
        int month = Convert.ToInt32(AuditMonth.SelectedValue);

        ListView1.DataSource = new TasksBLL().GetEmpolyeeTasks(branchID, empolyeeID, month, year);
        ListView1.DataBind();
    }

    protected void BranchList_SelectedIndexChanged(object sender, EventArgs e)
    {
        EmpolyeeList.DataBind();
    }
}